<extend name="Base/common"/>

<block name="style">
<link href="__CSS__/stylesheet.css" rel="stylesheet">
<link href="__CSS__/user.css" rel="stylesheet">
</block>

<block name="header">
<header>
	<include file="User/header" />
</header>
</block>

<block name="body">
<div class="container main">
	<div class="user-main">
		<div class="col-xs-3">
			<include file="User/left_menu" />
		</div>
		<div class="col-xs-9">
			<h5>我的闲置商品</h5>
			<div class="content">
				<div class="table-list xianzhi">
					<div class="hd">
						<ul class="table">
							<li>商品标题</li>
							<li>商品图片</li>
							<li>描述</li>
							<li>价格</li>
							<li>库存</li>
							<li>状态</li>
							<li>操作</li>
						</ul>
					</div>
					<div class="bd">
						<ul class="xianzhi-list">							
							<volist name="product_list" id='vo'>
							<li>
								<ul class="table">
									<li>
										<a href="{:U('product/detail',array('id'=>$vo['id']))}">{$vo.title|msubstr=0,32}</a>
									</li>
									<li><a href="{:U('product/detail',array('id'=>$vo['id']))}" class="thumb"><img src="__ROOT__{$vo.image_path}"></a></li>
									<li>{$vo.title|msubstr=0,50}</li>
									<li><em class="yen">￥</em><em class="price">{$vo.price|number_format=###,2}</em></li>											
									<li><em class="num">{$vo.quantity}</em></li>
									<li><eq value="1" name="vo['status']">已上架<else />已下架</eq></li>
									<li class="action">
										<eq value="1" name="vo['status']">
											<a href="{:U('AjaxAction/putway',array('id'=>$vo['id'],'status'=>0))}" class="btn ajax-get">下架</a>
											<else />
											<a href="{:U('AjaxAction/putway',array('id'=>$vo['id'],'status'=>1))}" class="btn ajax-get">上架</a>
										</eq>										
										<a href="{:U('AjaxAction/myproductdel',array('id'=>$vo['id']))}" class="btn cancel ajax-get">删除</a>
									</li>
								</ul>
							</li>
							</volist>
						</ul>
						<div class="page center">{$_page}</div>
					</div>
				</div>				
			</div>
		</div>
	</div>
</div>
</block>

<block name="script">
<script type="text/javascript">
highlight_leftnav("{:U('User/xianzhi')}");
highlight_subnav("{:U('User/index')}");
</script>
</block>